home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The CICA Windows Explosion!
/
The CICA Windows Explosion! - Disc 2.iso
/
programr
/
ole2book.zip
/
CHAP07.ZIP
/
CHAP07
/
SCHMOO
/
MAKEFILE
< prev
next >
Wrap
Text File
|
1993-06-22
|
4KB
|
144 lines
#
# MAKEFILE
# Schmoo version 2.0 Chapter 5
#
# Copyright (c)1993 Microsoft Corporation, All Rights Reserved
#
# Kraig Brockschmidt, Software Design Engineer
# Microsoft Systems Developer Relations
#
# Internet : kraigb@microsoft.com
# Compuserve: >INTERNET:kraigb@microsoft.com
#
#Add '#' to the next line for 'noisy' operation
!CMDSWITCHES +s
#
#Compiler flags
#Use "SET RETAIL=1" from MS-DOS to compile non-debug version.
#
!ifndef RETAIL
CFLAGS = -c -nologo -Od -AM -Zipe -G2s -W3 -GA -GEs
LINK = /al:16/ONERROR:NOEXE/CO
DEFS = -DSTRICT -DDEBUG
!else
CFLAGS = -c -nologo -Oas -AM -Zpe -G2s -W3 -GA -GEs
LINK = /al:16/ONERROR:NOEXE
DEFS = -DSTRICT
!endif
!ifdef SDI
DOC = -DSDI
CLASSLIB= classSDI
DIR = SDI
SRC_DIR = ..
!else
DOC = -DMDI
CLASSLIB= classMDI
DIR = MDI
SRC_DIR = ..
!endif
.SUFFIXES: .h .obj .exe .cpp .res .rc
TARGET = schmoo
goal: cd_build precomp.pch $(TARGET).exe cd_src
cd_build:
cd $(DIR)
cd_src:
cd ..
clean:
cd $(DIR)
del *.pch
del *.obj
del *.res
del *.exe
cd ..
PCHFLAGS= -Yu$(TARGET).h -Fpprecomp.pch
INCLS = $(SRC_DIR)\$(TARGET).h $(SRC_DIR)\resource.h
#CHAPTER5MOD
OLELIBS = compobj storage ole2
LIBS = libw mlibcew commdlg bttncur gizmobar stastrip $(CLASSLIB)
#End CHAPTER5MOD
OBJS1 = $(TARGET).obj client.obj
OBJS2 = document.obj
OBJS3 = polyline.obj polywin.obj
OBJS = $(OBJS1) $(OBJS2) $(OBJS3)
RCFILES1 = $(SRC_DIR)\$(TARGET).ico $(SRC_DIR)\document.ico $(SRC_DIR)\about.dlg
RCFILES2 = $(SRC_DIR)\gizmo72.bmp $(SRC_DIR)\gizmo96.bmp $(SRC_DIR)\gizmo120.bmp
RCFILES = $(RCFILES1) $(RCFILES2)
#####
{$(SRC_DIR)}.cpp{}.obj:
echo ++++++++++
echo Compiling $*.cpp
cl $(CFLAGS) $(PCHFLAGS) $(DEFS) $(DOC) $(SRC_DIR)\$*.cpp
{$(SRC_DIR)}.rc{}.res:
echo +++++++++
echo Compiling Resources
rc -r -i$(SRC_DIR) $(DEFS) $(DOC) -fo$@ $(SRC_DIR)\$*.rc
precomp.pch : $(SRC_DIR)\$(TARGET).h $(SRC_DIR)\polyline.h
echo +++++++++
echo Precompiling $(TARGET).h
cl $(CFLAGS) $(DEFS) -Yc$(TARGET).h -Fpprecomp.pch -Foprecomp $(SRC_DIR)\precomp.cpp
#This rule builds a linker response file on the fly depending on debug flags
$(TARGET).exe : $(OBJS) $(TARGET).res $(SRC_DIR)\$(TARGET).def
echo ++++++++++
echo Linking $@
echo precomp.obj + > $(TARGET).lrf
echo $(OBJS1) + >> $(TARGET).lrf
echo $(OBJS2) + >> $(TARGET).lrf
echo $(OBJS3) >> $(TARGET).lrf
echo $(TARGET).exe $(LINK) >> $(TARGET).lrf
echo nul/li >> $(TARGET).lrf
echo $(OLELIBS) + >> $(TARGET).lrf
echo $(LIBS) /NOD/NOE >> $(TARGET).lrf
echo $(SRC_DIR)\$(TARGET).def >> $(TARGET).lrf
link @$(TARGET).lrf
del $(TARGET).lrf
rc -v $(TARGET).res $(TARGET).exe
##### Dependencies #####
$(TARGET).res : $(SRC_DIR)\$(TARGET).rc $(INCLS) $(RCFILES)
#Application level things
#The file that does #define INITGUIDS should not use precompiled headers.
$(TARGET).obj : $(SRC_DIR)\$(TARGET).cpp $(INCLS)
echo ++++++++++
echo Compiling $*.cpp
cl $(CFLAGS) $(DEFS) $(DOC) $(SRC_DIR)\$*.cpp
client.obj : $(SRC_DIR)\client.cpp $(INCLS)
#Document level things
document.obj : $(SRC_DIR)\document.cpp $(INCLS) $(SRC_DIR)\polyline.h
#Editor level things
polyline.obj : $(SRC_DIR)\polyline.cpp $(INCLS) $(SRC_DIR)\polyline.h
polywin.obj : $(SRC_DIR)\polywin.cpp $(INCLS) $(SRC_DIR)\polyline.h